//
//  Graph.h
//  IA2
//
//  Created by Etienne Lecouturier on 25/01/13.
//  Copyright (c) 2013 Etienne Lecouturier. All rights reserved.
//

#ifndef __IA2__Graph__
#define __IA2__Graph__

#define MAX_INT 32767

#include "../include/Board.h"
#include "../include/Move.h"

#include <iostream>
#include <vector>

using namespace std;

class Graph {

public:
    Graph(Board mboard, time_t startTime);

    Graph(Board mboard, moves actions2, bool isOurTurn, int depth2, time_t startTime);

    void addChildren(Graph g); // add a child to the children list

    vector<Graph> getChildren(); // get the list of the children graph

    moves getMovesToSend(); // get the moves to do for our team

    float applyMinMax();
    float applyAlphaBeta(float malpha, float mbeta);


    bool isOurTurn();
    moves getMovesDone();

private:
    int depth; // depth
    bool ourTurn; // tells us if it our turn or not.
    float minmaxValue; // represents the min/ max value.
    float heuristic; // count the number of points or sth more complicated.
    Board board; // represents the map
    moves actions; // represents the actions applied to reach that node.

    vector<Graph> childrenList; // reprensents the children graph list

};

#endif /* defined(__IA2__Graph__) */
